package com.kxf.androidtestdemo.kotlin

/**
 *
 * @ProjectName:    AndroidTestDemo
 * @Package:        com.kxf.androidtestdemo.kotlin
 * @ClassName:      MyInterface
 * @Description:     接口
 * @Author:         kuangxuefeng
 * @qq:             1024883177
 * @CreateDate:     2021/3/10 11:14
 */
interface MyInterface{
    var name:String
    fun sayHello()
    fun sayInterface(){
        println("${name}sayInterface===")
    }
}

class MyInterfaceImpl() :MyInterface{
    override var name: String="MyInterfaceImpl==="
    override fun sayHello() {
        println("${name}sayHello===")
    }

    fun sayBey() {
        println("${name}sayBey===")
    }
}

fun main(args: Array<String>) {
    var mMyInterface : MyInterface = MyInterfaceImpl()

    mMyInterface.sayHello()
//    mMyInterface.sayBey()
    mMyInterface.sayInterface()
}